<?php
Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$.fn.yiiGridView.update('article-cat-grid', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<h1><?php echo $this->getActionLabel() ?></h1>

<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'article-cat-grid',
	'dataProvider'=>$model->search(),
	'filter'=>$model,
	'columns'=>array(
		array(
			'class'=>'CCheckBoxColumn',
		    'id'=>'ids', 
            'selectableRows'=>2, 
			//'name'=>'adminhtml-node-grid-ids',
		),
		'cat_id',
		'cat_name',
		'p_id',
		'keywords',
		'desc',
		'sort_order',
		array(
	        'name' => 'status',
	        'type' => 'raw',
	        'value' => 'AdminhtmlHelper::getStatusLabel( $data->status )',
			'filter'=> AdminhtmlHelper::getStatusOptions(),
	    ),
	    /*
		*/
		array(
			'class'=>'CButtonColumn',
		),
	),
)); ?>
